import { IsString } from 'class-validator';
export class CreateCoffeeDto {
  @IsString()
  readonly name: string;

  @IsString()
  readonly brand: string;

  @IsString({ each: true }) //each: true规范传入的必须是字符串
  readonly flavors: string[];
}
// dto文件是生成我们post所需要的的数据样式,readonly只读属性
